<template>
  <div :class="$style.sum">
    <BasicTable @register="registerTable">
      <template #yyxts="{ record, text }">
        <div class="text-light-500" :class="record?.sfyc === 'n' ? 'bg-green-500' : 'bg-red-500'">{{
          text || '--'
        }}</div>
      </template>
    </BasicTable>
  </div>
</template>

<script lang="ts" setup>
import { BasicTable, useTable } from '/@/components/Table'
import { columns, formSchemas } from './data'
import { list } from '/@/api/sum'

const [registerTable, {}] = useTable({
  rowKey: 'autoId',
  columns: columns(),
  showIndexColumn: false,
  api: list,
  formConfig: {
    labelWidth: 80,
    schemas: formSchemas(),
    labelAlign: 'right',
    autoSubmitOnEnter: true,
    actionColOptions: { span: 3 },
    colon: true,
  },
  beforeFetch(params) {
    params.year = 2024
    return params
  },
  useSearchForm: true,
  bordered: true,
})
</script>

<style module lang="less">
.sum {
  background-color: #FFF;
  :global {
  
    
  }
}
</style>
